package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 设备表
 * @TableName device
 */
@TableName(value ="device")
@Data
public class Device implements Serializable {
    /**
     * 设备ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 设备名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 设备类型(1-灯光,2-空调,3-窗帘,4-安防)
     */
    @TableField(value = "type")
    private Integer type;

    /**
     * 状态(0-离线,1-在线,2-故障)
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 设备位置
     */
    @TableField(value = "location")
    private String location;

    /**
     * IP地址
     */
    @TableField(value = "ip_address")
    private String ipAddress;

    /**
     * MAC地址
     */
    @TableField(value = "mac_address")
    private String macAddress;

    /**
     * 制造商
     */
    @TableField(value = "manufacturer")
    private String manufacturer;

    /**
     * 型号
     */
    @TableField(value = "model")
    private String model;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}